<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>构造函数</title>
</head>
 
<body>

    <div></div>
    <div></div>
    <div></div>

    <!-- 构造函数在js中的应用  Object Array  String Boolean  Date RegExp 全是函数，把一些公共的方法放在函数的原型上面， 通过构造函数-->

    <script>
        console.log(Object, 'object'); //  ƒ Object() { [native code] } 'object'
        console.log(Array, 'object'); // ƒ Array() { [native code] } 'object'
        console.log(String); // ƒ String() { [native code] }
        console.log(Boolean); // ƒ Boolean() { [native code] }
        console.log(undefined);
        console.log(null);
        console.log(Date);
        console.log(RegExp);

         console.log(new Array());
         console.log(Array.prototype.map,'???');   //
         console.log(Array.prototype,'这是对象');
         console.log(new Array().map,'???');
        
        //  只有对象才自己去找__proto__一层一层的去找对应的属性和方法
    </script>
</body>

</html>